import sys
import player,data,pygame
import pygame
#init
pygame.init()
PLAYING = True
GAME_VERSION = "0.1"
SCREEN_SIZE = (600,600)
screen = pygame.display.set_mode(SCREEN_SIZE)
USERNAME = "henda233"
#获得玩家数据
recv_data = data.exchange_data(username=USERNAME,movement="data",contact="GetPlayerData")
ply = player.Player(recv_data)

while PLAYING:
    for event in pygame.event.get():
        if event.type == pygame.QUIT:
            pygame.quit()
            sys.exit()
        if event.type == pygame.KEYDOWN:
            if event.key == pygame.K_UP:
                data.exchange_data()
